What the hech is all this?

You expected a simple sound driver, but found yourself with over 2.1 MBytes in files downloaded.

Basicly you are still in the right place.  However, I did not only want to write a sound driver to solve a sound problem, I also wanted to understand how sound drivers work.  The folders in this archive contain most of my development code - cleaned up and commentted as much as possible to help future developers.

I just wanted the sound driver!

Then just open folder #09, then open folder #3 that you will find inside, double-click 'my_quick_install.sh', and the driver is installed.  To make the driver active you can reboot, but the best appoach is to open 'preferences/media' from the deskbar, click on "Audio Settings" then "Restart Media Services".  At this point you should be able to chose "Sound Out" from the "Audio Output" drop-down menu.  After making this choice you need to "Restart Media Services" again and you should get sound.

Ofcourse, since this is from the parallel port, you first need a simple circuit attached to your computer as is diagrammed in folder #07!

What is the rest of this stuff?

To develop this driver I needed to do a lot of work and also hunt up a lot of information.  To help others develop thier own sound drivers for diffirent hardware I included most of my work, notes and any useful files I found as a resource for others use in thier own programming.

So what is here in the other folders?

The diffirent folders represent the step by step work needed to help me write a working sound driver.  I started looking for a compatible sound driver to work with my Dell Neomagic 2200 chipset.  Since I could not find one I started the work to create a driver that would work with any computer with printer port.

Folder #00: This my first clue that a driver was possible, it uses the internal buzzer/speaker to generate sounds.  While this driver does work ok on my desktop, either my laptop has a weak buzzer/speaker or the CPU is too slow but you can barely hear it on my Dell.  And no matter how hard I tried I was unable to find the source code for it to improve it's performance.

Folder #01: While I could not find any code for the driver in folder #00, I did find code for a simple sound driver that also uses the internal buzzer/speaker to generate sounds.  While this driver does not install as a sound card, it does create a 'dev/audio/PC_Speaker' device that can play sounds thru the same internal buzzer/speaker.

Folder #02: Okay, I already wanted to change the driver to use the parallel port, but first I needed to changed the code to be more readable as the original was too complex for me to read and follow due to the diffirent options the author wanted to try out in his code.

Folder #03: This is my version of the above code.  Like the original author I added a number of options, however I rewrote Alexander G. M. Smith's AGMSDeviceTest program to send different IOCTL control codes so these options can be changed while the driver was in operation.  This makes it possible to test and compare different timing methods with one sound driver.  On the 'OpenBeos FreeList' I noticed a reference to 'MyFirstDeviceDriver' which is now included inside folder #06, from this I stole the code for adding a driver settings files.  This means the default settings found at the start of the driver code can now be changed at initization by said file, and thus any tunable settings in turn can be changed in real-time by PC_Speaker_Controller program.

This folder serves another purpose, this is where I developed and debugged most of my timing and user IOCTL code, while you will find all the code and drivers work in this folder, but not all of the programs are 100% complete.

Folder #04: These is a fully working programming experiments into the diffirent versions of timing systems for the PC_Speaker driver.  Both non-interrupt and interrupt version of the code can be found here.

Folder #05: This folder contains diagrams of 8 bit DAC designs.  It also contains a folder of pictures of the DAC unit I built to use on my laptop.  You may notice there is a diagram for a 16 bit interface.  This is a far more complex design compared to a 8 Bit Resistor network but the changes to the driver software support would not be very major and can be added sometime in the future. 

Folder #06: Various text Documents and code samples I found as I tried to understand how sound drivers work.

Folder #07: These are the first fully working non-interrupt versions of the sound driver.  I posted them originally on Yahoo's BeDriver Forum.  Problems with Sympatico delayed me posting a downloadable location on BeBits at the time.

Folder #08: Parsound_by_mmu_man.  MMU_Man is a person who after seeing the code samples that you see in folder #07 wrote his own version.  He added not only interrupt driven outputting of the audio samples, but he also added a new idea that I never thought of.  By having the driver skip over the outputting of identical bytes the driver may want to output.  This means the driver spends more time in sleep mode = less CPU load on the OS.  I, ofcourse have stolen his very useful idea and added it to my own code.

Folder #09: Contains my working latest code.  The earlier versions of the programs are still included here so that if anyone is trying to understand my code they will be able to see the step by step development of the ideas.  Please note while version 0.60 is not the last version of the code I have tried to expand the comments thru-out the text/code.  I hope it will be a useful guide to others.

Folder #10: Latest working experimental code, this is where after figuring out how to set the sampling rate of a sound driver I found that the audio data processing at high sample rates (44.1 & 48.0 kHz) takes up so much CPU time that my laptop crashes.  The following versions of the code is where I simplify the code to make it faster.  I used 'ramspeed' version 2.41 at first, I found it too hard to use and thus wrote the program 'BenchMark'.  I then tried diffirent versions of the driver to find where the bottle-necks in the code were.

Folder Includes: The include files needed to compile the latest versions of the drivers.  Because there were duplicated copies in every folder containing code for sound drivers I decided to change all the copies to symbolic links to both save spaces and to insure all the programs were using the same code.  I tried to set up relative links but could not figure it out.  Because I do use symbolic links the main folder 'Parallel_Port_Audio' needs to be on the Desktop before any of the drivers will compile.
 
What is missing?

A lot!  First and foremost I have gotten nowhere getting useful information on developing multi-audio drivers.  Second, even regular drivers has information missing that is making it hard for me to develop a driver that can support more than one sample rate software per compiled version of the driver.  But some sound is better than no sound.  Expect to see more in the future.

                    Earl Colby Pottinger